<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>会员管理</title>
    <meta name="description" content="这是一个会员管理页面">
    <meta name="keywords" content="会员管理">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="${contextPath}/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="${contextPath}/assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="${contextPath}/assets/css/app.css">
    <script src="${contextPath}/assets/js/jquery.min.js"></script>
    <style>
        .am-u-sm-4{height:35px}
        .widget-body{margin-top: -20px}
    </style>
</head>

<body data-type="widgets">
<script src="${contextPath}/assets/js/theme.js"></script>
<div class="am-g tpl-g">
    <!-- 头部 -->
    <#include "/pc/common/header.html">
        <!-- 侧边导航栏 -->
        <#include "/pc/common/left.html">
            <!-- 内容区域 -->
            <div class="tpl-content-wrapper">
                <div class="row-content am-cf">
                    <div class="row">
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                            <div class="widget am-cf">
                                <ol class="am-breadcrumb widget-head">
                                    <li><a href="${contextPath}/index.htm" class="am-icon-home">首页</a></li>
                                    <li>会员管理</li>
                                    <div class="am-btn-group-xs am-btn-group" style="float: right">
                                        <button type="submit" class="am-btn am-btn-secondary" onclick="search_b()"><span class="am-icon-search"></span>搜索
                                        </button>
                                        <a href="${contextPath}/member/list.htm"
                                           class="am-btn am-btn-warning">
                                            <span class="am-icon-refresh"></span>清空
                                        </a>
                                    </div>
                                </ol>
                                <div class="widget-body  am-fr" style="margin-top: -20px">
                                    <div class="am-u-sm-12">
                                        <div class="am-g">
                                            <div class="am-form-inline">
                                                <div class="am-panel am-panel-default">
                                                    <div class="am-panel-bd">
                                                        <strong class="">会员注册总数：${total!0}</strong>
                                                        <strong style="padding-left: 30px;" class="">会员激活总数：${actives!0}</strong>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="am-g">
                                            <#if Session.manager_js == 2>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label for="cityid" class="am-form-label">归属城市：</label>
                                                <div class="am-form-group">
                                                    <select id="cityid" class="am-form-field" style="width: 185px;color: #a4a4a4;"
                                                            name="cityid">
                                                        <#if vo.cityid??>
                                                            <#assign cityid="${vo.cityid?c}" />
                                                        </#if>
                                                        ${dict.getCityOptions(cityid)}
                                                    </select>
                                                </div>
                                            </div>
                                            </#if>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label for="nickname" class="am-form-label">会员昵称：</label>
                                                <div class="am-form-group">
                                                    <input type="text" class="am-form-field" id="nickname" name="nickname"
                                                           placeholder="输入会员昵称" value="${vo.nickname!''}">
                                                </div>
                                            </div>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label for="realname" class="am-form-label">真实姓名：</label>
                                                <div class="am-form-group">
                                                    <input type="text" class="am-form-field" id="realname" name="realname"
                                                           placeholder="输入真实姓名" value="${vo.realname!''}">
                                                </div>
                                            </div>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label for="tel" class="am-form-label">手机号码：</label>
                                                <div class="am-form-group">
                                                    <input type="text" class="am-form-field" id="tel" name="tel"
                                                           placeholder="输入手机号码" value="${vo.tel!''}">
                                                </div>
                                            </div>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label for="cardno" class="am-form-label">身份证号：</label>
                                                <div class="am-form-group">
                                                    <input type="text" class="am-form-field" id="cardno" name="cardno"
                                                           placeholder="输入身份证号" value="${vo.cardno!''}">
                                                </div>
                                            </div>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label class="am-form-label">是否实名制：</label>
                                                <div class="am-form-group" id="ischeckname">
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="ischeckname" <#if vo.ischeckname?? && vo.ischeckname==1>checked</#if> value="1"> 是</label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="ischeckname" <#if vo.ischeckname?? && vo.ischeckname==0>checked</#if> value="0"> 否</label>
                                                </div>
                                            </div>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label class="am-form-label">是否激活：</label>
                                                <div class="am-form-group" style="width: 209px" id="isactive">
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="isactive" <#if vo.isactive?? && vo.isactive==1>checked</#if> value="1"> 是</label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="isactive" <#if vo.isactive?? && vo.isactive==0>checked</#if> value="0"> 否</label>
                                                </div>
                                            </div>
                                            <div class="am-u-sm-4 am-form-inline">
                                                <label class="am-form-label">是否合作商：</label>
                                                <div class="am-form-group" style="width: 197px" id="ismerchant">
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="ismerchant" <#if vo.ismerchant?? && vo.ismerchant==1>checked</#if> value="1"> 是</label>
                                                    <label class="am-radio-inline">
                                                        <input type="radio" name="ismerchant" <#if vo.ismerchant?? && vo.ismerchant==0>checked</#if> value="0"> 否</label>
                                                </div>
                                            </div>
                                            <div class="am-u-sm-4 am-form-inline am-u-end">
                                                <label class="am-form-label">注册时间：</label>
                                                <div class="am-form-group">
                                                    <input type="text" id="starttime" class="am-form-field" style="width: 100px;float: left"
                                                           placeholder="开始时间" <#if vo.starttime??>value="${vo.starttime?string('yyyy-MM-dd')}"</#if> data-am-datepicker><input id="endtime" type="text" class="am-form-field" style="width: 100px;float: left;margin-left: 5px"
                                                                                                                                                                               placeholder="结束时间" <#if vo.endtime??>value="${vo.endtime?string('yyyy-MM-dd')}"</#if> data-am-datepicker>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="am-u-sm-12" style="border-top: 1px solid #eef1f5;padding-top: 10px;margin-top: 10px">
                                        <table width="100%"
                                               class="am-table am-table-compact am-table-striped tpl-table-black am-text-nowrap am-scrollable-horizontal am-table-centered"
                                               id="example-r">
                                            <thead>
                                            <tr>
                                                <th>ID编号</th>
                                                <th>会员头像</th>
                                                <th>会员昵称</th>
                                                <th>归属城市</th>
                                                <th>真实姓名</th>
                                                <th>手机号</th>
                                                <th>身份证号</th>
                                                <th>分销上级会员</th>
                                                <th>是否实名制</th>
                                                <th>是否激活</th>
                                                <th>是否合作商</th>
                                                <th>注册时间</th>
                                                <th>会员账户</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <#list page as l>
                                                <tr class="gradeX">
                                                    <td>${l.id!}</td>
                                                    <td>
                                                        <#if l.headimg??>
                                                            <img src="${l.headimg}" class="tpl-table-line-img" alt=""
                                                                 width="50" height="50">
                                                        </#if>
                                                    </td>
                                                    <td>${l.nickname!}</td>
                                                    <td>
                                                        <#if l.cityid??>${dict.getCityName(l.cityid?c)}</#if>
                                                    </td>
                                                    <td>${l.realname!}</td>
                                                    <td>${l.tel!}</td>
                                                    <td>${l.cardno!}</td>
                                                    <td>${l.parentid!}</td>
                                                    <td>
                                                        <#if l.ischeckname??>
                                                            ${dict.getDicName('member_isCheckName',l.ischeckname?c)}
                                                        </#if>
                                                    </td>
                                                    <td>
                                                        <#if l.isactive??>
                                                            ${dict.getDicName('member_isActive',l.isactive?c)}
                                                        </#if>
                                                    </td>
                                                    <td>
                                                        <#if l.ismerchant??>
                                                            ${dict.getDicName('member_isMerchant',l.ismerchant?c)}
                                                        </#if>
                                                    </td>
                                                    <td>
                                                        <#if l.createtime??>
                                                            ${l.createtime?string('yyyy-MM-dd HH:mm:ss')}
                                                        </#if>
                                                    </td>
                                                    <td>
                                                        <a href="${contextPath}/member/account.htm?id=${l.id!}">
                                                            <i class="am-icon-money"></i> 详情
                                                        </a>
                                                    </td>
                                                </tr>
                                            </#list>
                                            </tbody>
                                        </table>
                                    </div>
                                    <#include "/pc/common/page.html">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
</div>
</div>
<#include "/pc/common/alert.html" />
<script src="${contextPath}/assets/js/amazeui.min.js"></script>
<script src="${contextPath}/assets/js/amazeui.datatables.min.js"></script>
<script src="${contextPath}/assets/js/dataTables.responsive.min.js"></script>
<script src="${contextPath}/assets/js/amazeui.page.js"></script>
<script src="${contextPath}/assets/js/app.js"></script>
<script>
    var search_b = function () {
        var nickname = $("#nickname").val();
        var realname = $("#realname").val();
        var cityid = $("#cityid").val();
        var tel = $("#tel").val();
        var cardno = $("#cardno").val();
        var ischeckname = $("input[name='ischeckname']:checked").val();
        var isactive = $("input[name='isactive']:checked").val();
        var ismerchant = $("input[name='ismerchant']:checked").val();
        var starttime = $("#starttime").val();
        var endtime = $("#endtime").val();
        var url = "${contextPath}/member/list.htm?nickname=" + nickname + "&realname=" + realname + "&tel=" + tel + "&cardno=" + cardno;
        if(cityid){
            url += "&cityid="+ cityid;
        }
        if (ischeckname && ischeckname != 'undefined') {
            url += "&ischeckname=" + ischeckname;
        }
        if (isactive && isactive != 'undefined') {
            url += "&isactive=" + isactive;
        }
        if (ismerchant && ismerchant != 'undefined') {
            url += "&ismerchant=" + ismerchant;
        }
        location.href = url+"&starttime="+starttime+"&endtime="+endtime;
    }
</script>
</body>

</html>